Easy2Siksha Sample Paper
Ans: Understanding Processes and CPU Scheduling: A Story
Imagine your computer as a bustling office. In this office, the CPU (Central Processing
Unit) is like the manager of all the work that needs to be done. The manager is
extremely skilled but can only focus on one task at a time. Meanwhile, there are
numerous employees (programs) who come in with different tasks to complete. These
tasks are called processes in computer science.
But what exactly is a process? Let’s break it down.
1. What is a Process?
A process is like a task assigned to an employee in our office analogy. It’s not just the
program itself—it’s the program in action. A program is a set of instructions lying on
your disk (like a blueprint). When the program is loaded into memory and the CPU starts
executing it, it becomes a process.
Key Characteristics of a Process:
1. Process ID (PID): Every process gets a unique identity, like an employee ID in the
office.
2. Program Counter (PC): Tells the CPU which instruction to execute next. Think of
it as the to-do list pointer.
3. Registers: These are like the memory slots on your desk, temporarily holding data
while the task is ongoing.
4. Memory Management Information: Keeps track of the space (like desk area) the
process occupies in memory.
5. State of the Process: A process can be in different states, just like employees can
be working, waiting for approval, or resting.
2. Process States
Processes move through different states in their lifecycle:
1. New: The task has just arrived in the office. It’s waiting to be accepted.
2. Ready: The process is ready to be executed. It’s like an employee waiting at the
manager’s desk for instructions.
3. Running: The CPU (manager) is currently working on the process. The task is
being actively handled.
4. Waiting/Blocked: The process is waiting for some event, like waiting for data
from disk or user input. Think of it as an employee waiting for a document from
another department.
5. Terminated: The task is finished, and the process leaves the office.